import request from '@/utils/request'

// 查询练习列表
function list(query) {
  return request({
    url: '/business/practice/list',
    method: 'get',
    params: query
  })
}

// 保存练习
function save(data) {
  return request({
    url: '/business/practice/save',
    method: 'post',
    data: data
  })
}

// 删除练习
export function del(id) {
  return request({
    url: '/business/practice/delete/' + id,
    method: 'delete'
  })
}

//批量删除练习
function batchDel(data) {
  return request({
    url: '/business/practice/batchDel',
    method: 'delete',
    data: data
  })
}

// 根据id获取练习详细信息
function findById(id) {
  return request({
    url: '/business/practice/findById/' + id,
    method: 'get'
  })
}

// 根据id获取练习详细信息
function findById1(id) {
  return request({
    url: '/business/practice/findById1/' + id,
    method: 'get'
  })
}

export const practice = {
  list,
  save,
  del,
  batchDel,
  findById,
  findById1
};
